<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>4.父级添加伪类after</title>

    <link rel="stylesheet" href="css/style4.css">

</head>
<body>

<div id="father" class="clear">
    <div class="layer01"><img src="images/1.jpg" alt=""/></div>
    <div class="layer02"><img src="images/2.jpg" alt=""/></div>
    <div class="layer03"><img src="images/3.jpg" alt=""/></div>
    <div class="layer04">
        浮动的盒子可以向左浮动，也可以向右浮动，直到它的外边缘碰到包含框或另一个浮动盒子为止。
    </div>
</div>

</body>
</html>